1. Field
The embodiments discussed herein relate to the technical field of a radio communication system, in particular in the technical field of WLAN (Wireless Local Area Network), and specifically to a method and a system for scanning in a radio communication system.
2. Description of the Related Art
While a mobile station (MS) roams in a WLAN, when the quality of the communication between the MS and an access point (AP) deteriorates to a certain degree, the MS will switch from the original AP to a new AP. During the process for the MS to switch the AP, if the MS is performing a real-time application service, it is desirable that the influence made by the switching to the MS is as small as possible, including the time delay during the switching being as small as possible. The time delay during switching includes mainly three parts: a detection latency, a scanning latency and an association/authentication latency. Currently, the detection latency and the association/authentication latency have been reduced to an accepted degree, while the scanning latency still is a problem to be solved.
The scanning latency takes about 90% of the whole switching process, and more importantly, the absolute value of the scanning latency is very big, which is from 150 ms to 500 ms or more. This is not acceptable to a real-time application service. The problem of the scanning latency originates from the IEEE 802.11 specifications which suggests that when switching an AP, an MS should transmit a probe message on all channels one by one, and stop communicating with the original AP to wait for a probe response message. Only when all probe response messages are received, can the MS select a new AP among all the APs probed. Since the Max Channel Time for waiting for each of the probe response message is 10˜100 ms, and the typical value of the Max Channel Time is 50 ms, then the time for waiting for all probe response messages is n*Max Channel Time, where n is the number of the channels probed. In the IEEE 802.11b specifications, the value of n is 14; in the IEEE 802.11a/g specifications, the value of n is 52. It can be seen that, according to the proposals in the IEEE 802.11 specifications, the scanning latency for an MS during its switching will be very big, which will affect the normal operation of the MS and the system.
In order to reduce the scanning latency, a method of Fast MAC-Layer Scanning (FMLS) has been proposed, and FIG. 1 is a flowchart of the FMLS method from the MS side. When an MS starts a scanning probe, first it transmits a fast scan probe message on each of the channels sequentially in the step 101. The difference from an ordinary scan probe message is that the fast scan probe message contains a Fast-Scan Information Element (FSIE), and the FSIE contains an Internet Protocol (IP) address and the response latency information of the MS. After having transmitted the fast scan probe message on each channel, the MS returns to the original channel in the step 102, so that the MS can continue communicating with the original AP while waiting for the probe response message based on the IP. Then, in the step 103, the MS initializes a timer, that is, to set the timer to zero, and starts timing. Two time points for waiting for the probe response message are pre-set in the MS, they are the minimum waiting time (minReplyWait) and the maximum waiting time (maxReplyWait) respectively, and the minReplyWait is less than the maxReplyWait. In the step 104, when the timing by the timer reaches the minReplyWait, if the MS has not received any probe response message, which indicates that no available network has been found, the scanning is stopped in the step 105; if the MS has received a probe response message, then in the step 106 the received probe response message is buffered and the timing continues. Then, it is decided in the step 107 whether the timer has reached the maxReplyWait. If the timer has reached the maxReplyWait, the scanning stops in the step 109; otherwise it continues in the step 108 to decide whether the probe response message is received. If the probe response message is received, the received probe response message is buffered in the step 110; otherwise it returns to the step 107 and continues to decide whether the timer has reached the maxReplyWait.
After the timer has reached the maxReplyWait, the scanning is stopped, and the signal to noise ratios (SNR) of the fast scan probe messages in all the probe response messages are compared, and the AP corresponding to the probe response message having the biggest SNR is selected as the new AP.
The above method is the FMLS method used from the MS side, a corresponding method is also carried out on the network side, and FIG. 2 is a flowchart of the FMLS method on the network side. In the step 201, if the AP receives a scan probe message transmitted by the MS on the channel used by it, the AP is called as a probed AP, and then in the step 202, it is detected whether the probe scan message has the FSIE. If the scan probe message received does not have the FSIE, then in the step 203, it is processed as an ordinary scan probe message. If the scan probe message received contains the FSIE, which indicates that this probe message is a fast scan probe message, and in the step 204 the FSIE is parsed to obtain the IP address therein. The IP address is that of the MS which transmits the scan probe message. Then, in the step 205, it is continued to decide whether the IP address obtained belongs to the local network. If the IP address belongs to the local network, it proceeds to the step 208 to stop the scanning. If the IP address does not belong to the local network, then in the steps 206 to 208, it continues to parse the FSIE to obtain the response latency information; according to the time required by the response latency, a probe response message based on a User Datagram Protocol (UDP) is transmitted to the MS corresponding to the IP address. The probe response message contains therein the SNR obtained by the probed AP by the measurement according to the fast scan probe message received thereby.
Since the probed AP, that is, the AP which receives the fast scan probe message, can communicate with the original AP of the MS based on an IP route, therefore, the AP that is probed by scanning by the MS transmits the probe response message to the MS by the original AP of the MS via the IP route.
Different from the scanning process required by the 802.11 specifications, when using the above FMLS method, the MS switches back to the original channel to continue communicating with the original AP after having transmitted the fast scan probe message sequentially to all the channels, so that the latency of the n*MaxChannelTime is reduced, and the scanning latency is significantly shorted. However, there are problems in the FMLS method, first, the AP probed needs to wait according to the response latency information after the fast scan probe message has been received, and the probe response message can be transmitted only within the time required by the response latency. The reason for setting the response latency is that the MS transmits the fast scan probe message on each channel in sequence, therefore, when the MS has not finished probing all the channels, it is possible that a certain AP has already received the fast scan probe message. If the AP transmits the probe response message immediately, the MS has not yet switched back to the original channel at that moment therefore the MS cannot communicate with the original AP, then the MS cannot receive the probe response message transmitted by the AP. The response latency is set to avoid losing the probe response message, but it also increases the scanning latency. Secondly, the another AP probed transmits the probe response message to the MS via the IP route, which will not only greatly reduce the network security, but also is hard to realize.
SUMMARY In view of what described above, the solution by the embodiments discussed herein to the technical problem is to provide a method and a system for scanning in a radio communication system, in particular for a WLAN, and compared to the prior art, by using the method and system of the embodiments not only the time delay of scanning is further reduced, but also the network security is improved and the difficulty in its realization is reduced.
For this purpose, the technical solution provided by the present embodiments can be as follows.
A method for scanning in a radio communication system, including: transmitting by a mobile station MS on all channels a probe message containing an Internet Protocol IP address of the original access point AP of the MS and a medium access control MAC address of the MS; switching to an original channel; transmitting a response inquiry message to the original AP, and receiving a probe response message within a predetermined period; wherein if the AP of the probe message received on the channel is not the original AP, the AP transmits a probe message containing the MAC address to the original AP according to the IP address; the original AP buffers the probe response message received, and transmits the probe response message to the MS according to the MAC address after the response inquiry message sent by the MS has been received.
Wherein, it further includes if the AP of the probe message received on the channel is the original AP, then the original AP buffers the probe response message generated thereby, and transmits the probe response message to the MS according to the MAC address after the response inquiry message sent by the MS has been received.
Wherein, it further includes the MS selects an AP corresponding to a channel with the best signal quality as a new AP based on the signal quality information in the probe response message.
Wherein the signal quality information includes signal strength or a signal to noise ratio.
Wherein, it further includes the original AP receives the response inquiry message transmitted by the MS and transmits an inquiry response message to the MS; and if the inquiry response message from the original AP is not received by the MS within the predetermined period, the response inquiry message is retransmitted by the MS to the original AP.
Wherein, it further includes if the number of times for the MS to transmit the response inquiry message reaches a predetermined value, then the transmitting of the response inquiry message stops.
According to the above method, the embodiments also propose a system for scanning in a radio communication system, including a MS, an original AP of the MS and another AP to be probed, wherein the MS comprises: a probe message transmitting unit, for transmitting on all channels a probe message containing an IP address of the original AP of the MS and a MAC address of the MS; a switching unit, for switching to an original channel after the probe message has been transmitted on all the channels; an inquiry unit, for transmitting a response inquiry message to the original AP on the original channel; and a probe response message receiving unit, for receiving a probe response message within a predetermined period; the original AP of the MS includes: a storage unit, for buffering the probe response message; a response message unit, for transmitting the probe message to the MS according to the MAC address after containing received the response inquiry message sent by the MS. The another AP probed includes: a probe message receiving unit, for receiving the probe message containing the IP address of the original AP of the MS and the MAC address of the MS transmitted by the MS; and a probe response message unit, for transmitting the probe response message containing the MAC address to the original AP of the MS according to the IP address.
Wherein the MS further includes: a new AP selecting unit, for selecting the AP probed having the best signal quality as the new AP according to signal quality information in the probe response message.
Wherein the signal quality information comprises signal strength or a signal to noise ratio.
Wherein, the original AP of the MS further comprises an inquiry response unit, the MS further includes a retransmitting unit; the inquiry response unit is for transmitting the inquiry response message to the MS after the response inquiry message transmitted by the MS has been received; and the retransmitting unit is for retransmitting the response inquiry message to the original AP if the inquiry response message from the original AP has not been received within the predetermined period.
Wherein, the retransmitting unit further includes: a stopping unit, for stopping the transmitting of the response inquiry message if the number of the times of transmitting the response inquiry message reaches a predetermined value. In the embodiments, an MS transmits on all channels a probe message containing an IP address of the original AP of the mobile station and a MAC address of the MS, switches to an original channel, transmits a response inquiry message to the original AP, and receives a probe response message within a predetermined period; if the AP of the probe message received on the channel is not the original AP, the AP transmits a probe message containing the MAC address to the original AP according to the IP address; the original AP buffers the probe response message received, and transmits the probe response message to the MS according to the MAC address after the response inquiry message sent by the MS has been received. It can be seen here that after the other probed AP has received the probe message, there is no need to wait for the time delay, then a probe response message can be sent out immediately, so as to reduce the time delay of the whole scanning process. When a probe response message reaches the original AP of the MS ahead of the response inquire message of the MS, the original AP buffers the probe response message until the response inquire message of the MS is received, so as to avoid losing the probe response message. Furthermore, the probed AP does not transmit the probe response message to the MS via the IP route, instead, it first transmits the probe response message to the original AP of the MS via the IP route, then the probe response message is transmitted by the original AP to the MS according to the MAC address, so as to improve the network security.
In the embodiments, it is further considered that when the MS is scanning each of the channels, the communication quality between the MS and the original AP is very low, therefore, messages may be lost when the MS is transmitting the response inquiry message to the original AP, therefore the retransmitting mechanism is introduced to ensure the reliability of the message transmission.